package com.example.hospitalsystem.controller;

import com.example.hospitalsystem.pojo.dto.caseP.AddCaseInfo;
import com.example.hospitalsystem.pojo.dto.caseP.CasePageQueryDto;
import com.example.hospitalsystem.pojo.dto.caseP.DoctorChangeCaseDto;
import com.example.hospitalsystem.result.Result;
import com.example.hospitalsystem.service.CaseService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/getAllCase")
@Tag(name="10.病例模块")
public class CaseController {

    @Autowired
    private CaseService caseService;

    @Operation(summary = "管理员获取所有病例信息")
    @GetMapping("/adminGetAllCase")
    public Result<Object> adminGetAllCaseInfo(CasePageQueryDto casePageQueryDto){
        return caseService.adminGetAllCase(casePageQueryDto);
    }

    @Operation(summary = "医生获取医治病例信息")
    @GetMapping("/doctorGetAllCase")
    public Result<Object> doctorGetAllCaseInf(CasePageQueryDto casePageQueryDto){
        return caseService.doctorGetAllCase(casePageQueryDto);
    }

    @Operation(summary = "管理员删除病例信息")
    @DeleteMapping("/adminDeleteCase/{id}")
    public Result<Object> adminDeleteCase(@PathVariable("id") int id){
        return caseService.adminDeleteCase(id);
    }

    }




















